package com.ss.android.article.browser.database.bookmark;

import android.support.annotation.NonNull;

import com.a.a.NightMode;
import com.a.a.u;
import com.ss.android.article.browser.database.BrowserHistory;

import java.util.ArrayList;
import java.util.Iterator;

public final class i implements NightMode {
    private final a b;
    private final ArrayList a;

    public i(a arg1, ArrayList arg2) {
        this.b = arg1;
        this.a = arg2;

    }

    public final void f(@NonNull Object arg4) {
        com.ss.android.article.browser.database.bookmark.a.a(this.b).beginTransaction();
        Iterator v1 = this.a.iterator();
        while (v1.hasNext()) {
            com.ss.android.article.browser.database.bookmark.a.b(this.b, ((BrowserHistory) v1.next()).url);
        }

        com.ss.android.article.browser.database.bookmark.a.a(this.b).setTransactionSuccessful();
        com.ss.android.article.browser.database.bookmark.a.a(this.b).endTransaction();
        ((u) arg4).onComplete();
    }
}

